<template>
  <div>
    {{total}}
  </div>
</template>

<script>
export default {
  data () {
    return {

    }
  },

  created () {

  },
  props: ['arr'],
  computed: {
    total () {
      let sum = 0
      this.arr.forEach(item => {
        if (item.checked) {
          return (sum += item.price * item.num)
        }
      })
      return sum
    }
  },
  methods: {

  }
}
</script>

<style scoped lang='less'>

</style>
